Masala #0913
Kuchli shoh
\(8 × 8\) shaxmat doskasida “Kuchli shoh” figurasi \(v_1\) katakda turibdi. “Kuchli shoh” figurasi oddiy shohdan farqi shundaki, uning bir yurishi 2 barobar kattaroqdir. To‘liqroq tushunish uchun rasmga qarang. Bu rasmda d4 katakda turgan “”Kuchli shoh” ning mumkin bo‘lgan barcha yurishlari tasvirlangan.
U \(v_2\) katakka minimal necha yurishda bora oladi?
Yagona qatorda ikkita satr - \(v_1\) va \(v_2\), \(8 × 8\) doskadagi kataklar beriladi.
Bitta butun son — “Kuchli shoh” \(v_1\) katakdan \(v_2\) katakka borishi uchun kerak bo‘ladigan minimal yurishlar sonini chiqaring.
# | input.txt | output.txt |
---|---|---|
1 |
d4 f6 |
1 |
2 |
a1 g6 |
3 |